
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Grebok.Common;
using Grebok.Common.Configuration;

namespace EVegetable.Persistence.Test.DataManager
{
    public class TSys_DepartmentManager : BaseManager
    {
        #region private field

        private static TSys_DepartmentManager manager;
        #endregion

        #region Properties
        
        public Int32 DeptID
        {
            get { return GetConfig<Int32>("DeptID"); }
            set { SetConfig<Int32>("DeptID", value); }
        }
        
        public Int32? PDeptID
        {
            get { return GetConfig<Int32?>("PDeptID"); }
            set { SetConfig<Int32?>("PDeptID", value); }
        }
        
        public String DeptName
        {
            get { return GetConfig<String>("DeptName"); }
            set { SetConfig<String>("DeptName", value); }
        }
        
        public String DeptCode
        {
            get { return GetConfig<String>("DeptCode"); }
            set { SetConfig<String>("DeptCode", value); }
        }
        
        public String Description
        {
            get { return GetConfig<String>("Description"); }
            set { SetConfig<String>("Description", value); }
        }
        
        public Int32? Creator
        {
            get { return GetConfig<Int32?>("Creator"); }
            set { SetConfig<Int32?>("Creator", value); }
        }
        
        public DateTime? CreatedDate
        {
            get { return GetConfig<DateTime?>("CreatedDate"); }
            set { SetConfig<DateTime?>("CreatedDate", value); }
        }
        
        public Int32? Modifier
        {
            get { return GetConfig<Int32?>("Modifier"); }
            set { SetConfig<Int32?>("Modifier", value); }
        }
        
        public DateTime? ModifiedDate
        {
            get { return GetConfig<DateTime?>("ModifiedDate"); }
            set { SetConfig<DateTime?>("ModifiedDate", value); }
        }
        

        #endregion

        #region Constructor

        /// <summary>
        /// TSys_DepartmentManager
        /// </summary>
        private TSys_DepartmentManager()
        {
            IApplicationConfiguration configuration = ApplicationConfigurationFactor.CreateApplicationConfiguration();
            appPropertiese = new ApplicationProperties(configuration[PropertiesConst.TSYS_DEPARTMENT_PROPERTIES_FILE_NAME_KEY],
                configuration[PropertiesConst.TSYS_DEPARTMENT_PROPERTIES_SECTION_NAME_KEY]);

            appPropertieseValues = new Dictionary<string, object>();
        }
        #endregion

        #region TSys_DepartmentManager Instance

        /// <summary>
        /// TSys_DepartmentManager's Instance
        /// </summary>
        public static TSys_DepartmentManager Instance
        {
            get
            {
                if (manager == null)
                {
                    manager = new TSys_DepartmentManager();
                }
                return manager;
            }
        }
        #endregion

    }
}
